package Demo1;

import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-07-09
 * Time: 16:23
 */
public class Test {
    public static void main(String[] args) {
        //简单的洗牌算法
        //1.买到 52 张不同的牌，除去大小王
        Operate test = new Operate();
        test.buyCard();
        System.out.println(test.cards);
        //2.随机洗牌
        test.shuffle();
        System.out.println(test.cards);
        //3.发牌：总共3人，每人5张牌
        //创建三个顺序表，每个顺序表代表一个人，可以存牌
        List<List<Card>> person = new ArrayList<>();
        person.add(new ArrayList<>());
        person.add(new ArrayList<>());
        person.add(new ArrayList<>());
        test.Licensing(person);
        for (List<Card> ret:person) {
            for (Card temp:ret) {
                System.out.print(temp);
            }
            System.out.println();
        }
    }
}
